package com.redoor.app.stake.basicdata.service;

import com.redoor.app.stake.basicdata.model.BaseAssetOperationTrajectory;
import com.redoor.app.stake.basicdata.model.BaseStation;
import com.redoor.app.stake.basicdata.model.BussinessTypeEnum;
import com.redoornetwork.framework.mybatis.service.Service;

import java.util.List;

/**
 * Created by wangjunlei on 2018-03-03 19:26:43.
 */
public interface BaseAssetOperationTrajectoryService extends Service<BaseAssetOperationTrajectory, String> {
    /**
     * 批量添加
     * @param operationTrajectories
     * @return
     */
    int saveAll(List<BaseAssetOperationTrajectory> operationTrajectories);


    /**
     * 记录操作轨迹日志
     * @param uuid 资产主键
     * @param tag  动作类型
     * @param assettype 资产类型
     * @param sourcetype 操作来源类型
     * @param sourceuuid 操作来源id
     * @param oldStation 旧对象：用于比对详细轨迹
     * @param newStation 新对象：用于比对详细轨迹
     */
    void addTraceLog(String uuid, String tag, BussinessTypeEnum.TRACE_BUSINESS_TYPE assettype,BussinessTypeEnum.TRACE_TYPE sourcetype, String sourceuuid, Object oldStation, Object newStation);

    /**
     * 查询对应资产类型的轨迹记录列表
     * @param bussinessTypeEnum
     * @param uuid
     * @return
     */
    List<BaseAssetOperationTrajectory> getTraceList(BussinessTypeEnum.TRACE_BUSINESS_TYPE bussinessTypeEnum,String uuid);
}
